home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmPokerHand
- Caption = "Poker Hand"
- ClientHeight = 1905
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 2640
- LinkTopic = "Form1"
- ScaleHeight = 1905
- ScaleWidth = 2640
- StartUpPosition = 3 'Windows Default
- Begin VB.PictureBox picHand
- Height = 1095
- Left = 120
- ScaleHeight = 1035
- ScaleWidth = 2355
- TabIndex = 3
- Top = 120
- Width = 2415
- End
- Begin VB.CommandButton cmdQuit
- Caption = "&Quit"
- Height = 495
- Left = 1800
- TabIndex = 2
- Top = 1320
- Width = 735
- End
- Begin VB.CommandButton cmdDeal
- Caption = "&Deal"
- Height = 495
- Left = 960
- TabIndex = 1
- Top = 1320
- Width = 735
- End
- Begin VB.CommandButton cmdShuffle
- Caption = "&Shuffle"
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 1320
- Width = 735
- End
- Attribute VB_Name = "frmPokerHand"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private WithEvents cards As CDeckOfCards
- Attribute cards.VB_VarHelpID = -1
- Private Sub cmdDeal_Click()
- Dim str As String
- Dim i As Integer
- picHand.Cls
- For i = 1 To 5
- str = cards.ReadCard(i)
- picHand.Print str
- Next i
- End Sub
- Private Sub cmdQuit_Click()
- End
- End Sub
- Private Sub cmdShuffle_Click()
- Call cards.ShuffleDeck
- End Sub
- Public Sub cards_shuffling(n As Integer, nMax As Integer)
- 'n is the number of the specific pass through the deck (1, 2, 3..)
- 'nMax is the total number of passes when the deck is shuffled
- picHand.Cls
- picHand.Print "Shuffling Pass:"; n; "out of"; nMax
- End Sub
- Private Sub Form_Load()
- Set cards = New CDeckOfCards
- End Sub
-